1. Field of the Invention
This invention relates to communication networks, e.g., LANS. More particularly, the invention relates to a system and method for avoiding host transmit underruns using a frame adjustable threshold in a communication network.
2. Description of Prior Art
In a communication network in which a host system exchanges data with the network through a Peripheral Component Interconnect (PCI) bus and a Medium Access Control (MAC) device, a significant problem is presented when transmit underruns occur requiring the host system to retransmit a sequence of frames. Due to the poor performance of the PCI bus in some computers, MAC devices may have difficulty moving data from a host buffer to a transmit storage device, e.g., RAM, fast enough to keep data flowing to the network. Often delay states are introduced in this transfer by the PCI bus, adding time to the transfer. The additional data transfer time across the PCI Bus causes the data to be read out of the transmit storage device faster on the network side than data is provided to the input side of the transmit storage device. If the data being written into the transmit storage device is at a slower rate than transmitted to the network, a transmit underrun can occur.
Because of the possibility of transmit underruns, one technique is to preload data into the transmit storage device before beginning transmission on the network. A problem is presented in determining how much data to preload to the transmit storage device. If too much data is preloaded than is needed to prevent an underrun, the network performance will be degraded. If not enough data is preloaded, transmit underruns will occur. A solution to the problem is to determine the correct amount of data to preload on transmission. The amount of data to be loaded can vary from system-to-system depending on the PCI bus performance. The amount of data that is preloaded in the transmit storage device is referred to as a "transmit threshold".
The primary objective in frame transmission is to transmit each frame as soon as possible, by keeping the transmit threshold as low as possible. However, if the threshold is too low, the system may not be able to keep up with the demand for data to be transmitted, thereby incurring an underrun which must be retried with a higher threshold. For performance reason, underruns should be avoided by incurring a slightly higher frame latency rather than initiate a retry on a large number of frames.
Prior art related to transmit underruns in a communications system include the following:
U.S. Pat. No. 5,602,537 issued Feb. 11, 1997, filed May 13, 1994, discloses a technique for eliminating data transfer memory underruns. Once the amount of preloading in a FIFO reaches a predetermined threshold value or the end of frame data has been preloaded, a transmitter begins transmitting data from the memory.
U.S. Pat. No. 5,434,872 issued Jul. 18, 1995, discloses a dedicated transmit buffer with monitoring of the data in the frame to prevent underrun. The amount of data of a frame downloaded by the host to the transmit buffer is monitored to make a threshold determination of an amount of data of the frame resident in the transmit data buffer. A network interface controller includes logic for initiating transmission of the frame when a threshold determination indicates that a sufficient portion of the frame is resident in the transmit buffer, prior to the transfer of all of the data of the frame into the transmit buffer. The monitoring logic includes a threshold state which is programmable by the host computer for storing a threshold value. The threshold value may be set by the host system to optimize performance in a given setting.
U.S. Pat. No. 5,623,606 issued Apr. 22, 1997, filed Oct. 29, 1992, discloses a threshold amount of preloading that is set in a MAC device by host software. The MAC device has logic to determine if the threshold is met before starting transmission.
U.S. Pat. No. 4,942,553 issued Jul. 17, 1990, discloses detecting a fill or empty level of a FIFO. When a fill or empty level exceeds a first request level, notification is made to a Direct Memory Access (DMA) or a coprocessor. The fill or empty level is compared to a second request level, and when such level exceeds a second level request, second level notification to the CPU is generated. In most cases, DMA or coprocessor is able to obtain control of the bus before the request level for a CPU interrupt is reached thereby preventing a waste of CPU intervention as well as FIFO overrun/underrun.
U.S. Pat. No. 4,945,548 issued Jul. 31, 1990, discloses detecting impending overflow and/or underruns of an elasticity buffer. Write overflow or read underrun of a storage element is detected before any data corruption can occur by comparing input and output pointers. An error condition is detected if the input and output pointers overlap for a threshold, which can be shorter than a period required for writing or reading of a multi-bit data unit to or from the buffer. The overlap time period is determined by comparing the pointers at one or more sampling times corresponding to selected phases of a clock.
IBM Technical Disclosure Bulletin (TDB) published May 1991, pages 370-371, discloses a technique for detecting overrun and underrun conditions in a queue communications network while guaranteeing the data integrity of a First-In or First-Out (FIFO) buffer.
None of the prior art establishes an adjustable transmit threshold for a MAC device on a frame-by-frame basis using blocks of data instead of a byte count and providing a "retry" signal to a host system to readjust the transmit threshold according to the host system's performance level.